#ifndef FRONT_END_H
#define FRONT_END_H

#include <iostream>
#include "scanner.h"
#include "parser.h"
#include "errrptr.h"
#include "progovr.h"
#include "blktrans.h"
#include "cmddb.h"

namespace gcode {

	class FrontEnd
	{
		ErrorReporter &er_;
		ProgramOverride &po_;
		std::istream *is_;
		Scanner scanner_;
		Parser parser_;
		BlockTranslator bt_;
		bool reportEmptyBlocks_;
		bool reportSkippedBlocks_;
	public:
		FrontEnd(ErrorReporter &er, ProgramOverride &po, CommandDatabase &cmddb, std::istream *is = 0);
		void setInputStream(std::istream *is);
		void translate();
	};

} // namespace gcode

#endif
